1. Field of the Invention
The present invention relates generally to an image-capturing apparatus such as a digital camera, and more particularly to an image-capturing apparatus having a function of correcting a captured image which is distorted due to an inclination of a camera with respect to a photographic subject, and to an image correction method and a program for use in the image-capturing apparatus.
2. Description of the Related Art
With an increasing popularity of digital cameras in these years, it is considered that the digital camera is used not only to simply photograph scenes and persons, but also to capture images of documents, such as paper sheets or personal cards, or images on a whiteboard or the like, and to digitally save and manage the captured images in personal computers, etc.
In the case where a document, a whiteboard, etc. is a photographic subject, it is possible that the subject is photographed in an oblique direction because of the position of the photographer, illumination light, etc. In such a case, keystone distortion (trapezoidal distortion) may occur in a captured image in accordance with the inclination of the camera, and characters, etc. on the image may become illegible.
A conventional method of correcting such image distortion is disclosed, for example, in Patent Document 1 (Jpn. Pat. Appln. KOKAI Publication No. 2005-115711). In Patent Document 1, contour information of a photographic subject is extracted, and distortion of a captured image is corrected on the basis of the contour information. Thereby, even in the case where an image is captured by a camera that is inclined, it is possible to obtain a rectangular image as if it were captured by a camera that is set in a frontal direction.
In the method of Patent Document 1, however, the following problem will arise. That is, since the contour information of the subject is used, correction cannot be made unless the contour information is correctly extracted. In this case, there is a possible method in which the user designates the contour part of the image on the screen. However, this is very time-consuming and a great load is imposed on the user.